package com.xhwl.centiotdata.pushtrigger.alarm;

import com.xhwl.centiotdata.handler.alarm.impl.AlarmIStartIotMaxHandle;
import com.xhwl.centiotdata.handler.alarm.impl.HaiKangReceiveHandler;
import com.xhwl.common.pojo.ResultJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Auther ChaoYun
 * @Description 光伏Max告警消息推送入口
 * @Date 2022/8/30
 */
@RestController
@RequestMapping("/")
@Slf4j
public class IStartIOTMaxAlarmController {
    @Autowired
    AlarmIStartIotMaxHandle alarmIStartIotMaxHandle;

    @PostMapping("/alarm-receive/max-receive/{projectId}")
    public ResultJson maxInfoReceive(@RequestBody String maxInfoReceiveContent,
                                     @PathVariable("projectId") Integer projectId) {
        return alarmIStartIotMaxHandle.maxInfoReceive(maxInfoReceiveContent, projectId);
    }
}
